x86-64: don't use xmalloc_array() for allocation of the (per-CPU) IDTs
authorJan Beulich <jbeulich@suse.com>
Thu, 13 Oct 2011 08:02:34 +0000 (10:02 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 13 Oct 2011 08:02:34 +0000 (10:02 +0200)
commitddbb942359ebec0d96a73a90495e0b29a19266f9
treec24fa28224f59361af4d6738163c46772c8086bd
parentb569c46bb3153903d59f3eeefc19ee046dab75e0
x86-64: don't use xmalloc_array() for allocation of the (per-CPU) IDTs

The IDTs being exactly a page in size, using xmalloc() here is rather
inefficient, as this requires double the amount to be allocated (with
almost an entire page wasted). For hot plugged CPUs, this at once
eliminates one more non-order-zero runtime allocation.

For x86-32, however, the IDT is exactly half a page, so allocating a
full page seems wasteful here, so it continues to use xmalloc() as
before.

With most of the affected functions' bodies now being inside #ifdef-s,
it might be reasonable to split those parts out into subarch-specific
code...

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/smpboot.c